package com.guoxin.thread.volidate;

public class VolidateThread extends Thread {
    public volatile boolean flag = true;

    @Override
    public void run() {
        System.out.println("子线程开始启动");
        while(flag){}
        System.out.println("子线程停止");
    }

    public void isRun(boolean flag){
        this.flag = flag;
    }
}
